<?php
    /**
     * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
     * @copyright FireBloom Studio
     * @link http://firebloom.cc
     */

    $performed_by = get_entity($vars['item']->subject_guid);
    //$image = get_entity($vars['item']->object_guid);
    $object = get_entity($vars['item']->object_guid);
    if($object->title) {
        $title = $object->title;
    } else {
        $title = "untitled";
    }
   
    $url = $vars['url'];
    $album = get_entity($object->container_guid);
    $mime = $object->mimetype;
    $person_link = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
    $image_link = "<a href=\"" . $object->getURL() . "\">" . $title . "</a>";
    $album_link = "<a href='". $album->getURL() . "'>" . $album->title . "</a>";

    $summary .= sprintf(elgg_echo("image:river:created"),$person_link, $image_link, $album_link);

    $goto_full = "<a href=\"{$object->getURL()}\" class=\"goto_full\" id=\"image_toggle-{$object->guid}\">".elgg_echo('river:image:goto_full')."</a>";
   
    $thumb = "<img src=\"{$url}mod/tidypics/thumbnail.php?file_guid={$object->guid}&size=small\" border=\"0\" alt=\"thumbnail\"/>";
   
    echo elgg_view('river/item/extra',
                    array('performed_by'=>$performed_by,
                        'object'=>$object,
                        'body'=>$summary.' <br /> '.$goto_full.'<br />'.$thumb,
                        'show_comment'=>TRUE)
                    );
	
?>